package com.wz.project.bas.basClassManage.service;

import com.wz.common.utils.text.Convert;
import com.wz.framework.aspectj.lang.annotation.DataSource;
import com.wz.framework.aspectj.lang.enums.DataSourceType;
import com.wz.project.bas.basClassManage.domain.BasClass;
import com.wz.project.bas.basClassManage.mapper.ClassMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service

public class ClassServiceImpl implements ClassService{

    @Autowired
    ClassMapper classMapper;

    @Override
    public List<BasClass> selectClassList(BasClass basClass) {
        return classMapper.selectClassList(basClass);
    }

    @Override
    public int deleteClassByIds(String ids) {
        String[] userIds = Convert.toStrArray(ids);
        return classMapper.deleteClassByIds(userIds);
    }

    @Override
    public BasClass selectClassByClassId(String class_id) {
        return classMapper.selectClassByClassId(class_id);
    }

    @Override
    public int saveAndUpdate(BasClass basClass) {
        return classMapper.saveAndUpdate(basClass);
    }

    @Override
    public int insertClass(BasClass basClass) {
        return classMapper.insertClass(basClass);
    }
}
